<template>
  <view class="network-error">
    <PageLayout full safe-area="none" :page-style="pageStyle">
      <template #header> </template>

      <view class="error-body">
        <view>
          <view class="tips">
            <img src="/static/img_NoNetwork.png" alt="" />
          </view>
          <p class="tips-text">网络出问题了，快去检查一下吧～</p>
        </view>
      </view>
    </PageLayout>
  </view>
</template>

<script setup lang="ts">
import PageLayout from '@/layout/page/page.vue'
import { onShow } from '@dcloudio/uni-app'
const pageStyle = {
  backgroundColor: '#FFFFFF',
}
let setNewTime: unknown
function getNetType() {
  wx.onNetworkStatusChange((res) => {
    //取反满足条件,跳转已经写好的网络异常页面
    if (res.isConnected) {
      uni.navigateBack()
    }
  })
}
onShow(() => {
  // getNetType()
})
</script>
<style lang="less">
.network-error {
  .error-body {
    height: calc(100vh - 160rpx);
    display: flex;
    justify-content: center;
    .tips {
      margin-top: calc(15% + 136rpx);
    }
    .tips-text {
      width: 100%;
      font-size: #2d3746;
      text-align: center;
      font-size: 28rpx;
      margin-top: 60rpx;
      font-weight: 400;
    }
  }
}
</style>
